<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/


namespace City\Controller;
use Think\Controller;
class IndexController extends Controller {
	
	public function indexAction(){
		
		$cityarr=M('CategoryCity')->where("apiid>0")->field('catid,code,color,apiid,name')->order('code ASC')->select();
		
		$num=count($cityarr);
		
  		for ($i=A;$i<=(Z);$i++){
            for ($b=0;$b<$num;$b++){
                if ($cityarr[$b]['code']==$i){
					$list[$i][]=$cityarr[$b];
				}
            }       
        }
				
		$this->assign('list',$list);
		$this->assign('PATH',array('城市分类',$result['categoryone']['name']));
		$this->assign('SEO',array('title'=>'城市分类'.$result['categoryone']['name'],'keywords'=>$result['categoryone']['keywords'],'description'=>$result['categoryone']['description']));
		$this->display();
	}

}

?>